package com.ruoyi.inspection.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.inspection.config.GovernDataConfig;
import com.ruoyi.inspection.domain.GovernCheckTaskInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Slf4j
@RestController
@Api("字典数据接口")
@RequestMapping("/check/governDict")
public class GovernDictController extends BaseController {
    @ApiOperation("检查类型")
    @GetMapping("/getCheckType")
    public AjaxResult queryCheckType() {
        return AjaxResult.success(GovernDataConfig.getList(GovernDataConfig.JIAN_CHA_LEI_XING));
    }

    @ApiOperation("隐患来源")
    @GetMapping("/getHiddenSource")
    public AjaxResult queryHiddenSource() {
        return AjaxResult.success(GovernDataConfig.getList(GovernDataConfig.YIN_HUAN_LAI_YUAN));
    }

    @ApiOperation("隐患类型")
    @GetMapping("/getHiddenType")
    public AjaxResult queryHiddenType() {
        return AjaxResult.success(GovernDataConfig.getList(GovernDataConfig.YIN_HUAN_LEI_XING));
    }

    @ApiOperation("隐患排查级别")
    @GetMapping("/getCheckLevel")
    public AjaxResult queryCheckLevel() {
        return AjaxResult.success(GovernDataConfig.getList(GovernDataConfig.PAI_CHA_JI_BIE));
    }

    @ApiOperation("隐患等级")
    @GetMapping("/getHiddenLevel")
    public AjaxResult queryHiddenLevel() {
        return AjaxResult.success(GovernDataConfig.getList(GovernDataConfig.YIN_HUAN_DENG_JI));
    }

    @ApiOperation("危害类型")
    @GetMapping("/getWeiHaiType")
    public AjaxResult queryWeiHaiType() {
        return AjaxResult.success(GovernDataConfig.getList(GovernDataConfig.WEI_HAI_LEI_XING));
    }

    @ApiOperation("隐患治理类型")
    @GetMapping("/getZhiLiType")
    public AjaxResult queryZhiLiType() {
        return AjaxResult.success(GovernDataConfig.getList(GovernDataConfig.ZHI_LI_LEI_XING));
    }

}
